package com.example.myrequestbody.model;

import com.example.myrequestbody.validator.AddGroup;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 学校
 *
 * @author dlp
 * @date 2024/08/27
 */
@Data
public class School implements Serializable {
    private static final long serialVersionUID = 1L;

    public School() {
    }

    /**
     * 身份证件
     */
    private Long id;

    /**
     * 学校名称
     */
    @NotNull(message = "学校名称不能为空！",groups = AddGroup.class)
    private String schoolName;

    /**
     * 学校地址
     */
    private String schoolAddress;

    /**
     * 学校区域
     */
    private BigDecimal schoolArea;

    /**
     * 学校评级
     */
    @NotNull(message = "学校评级不能为空！",groups = AddGroup.class)
    private String schoolRating;

    @Override
    public String toString() {
        return "School{" +
                "id=" + id +
                ", schoolName='" + schoolName + '\'' +
                ", schoolAddress='" + schoolAddress + '\'' +
                ", schoolArea=" + schoolArea +
                ", schoolRating='" + schoolRating + '\'' +
                '}';
    }
}
